package com.zijie.shopbrandapi.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zijie.brand.model.Brand;
import com.zijie.brand.model.search.BrandSearchBean;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface BrandMapper  extends BaseMapper<Brand> {
     default Page<Brand> findAll(Page<Brand> page, BrandSearchBean bsb){
         LambdaQueryWrapper<Brand> query = Wrappers.lambdaQuery(bsb);
         return selectPage(page, query);
     }
}
